import Unranked from '@renderer/assets/unranked.png'
import Black from '@renderer/assets/black.png'
import bronze from '@renderer/assets/bronze.png'
import Silver from '@renderer/assets/silver.png'
import Gold from '@renderer/assets/gold.png'
import Platinum from '@renderer/assets/platinum.png'
import Emerald from '@renderer/assets/emerald.png'
import Diamond from '@renderer/assets/diamond.png'
import Master from '@renderer/assets/master.png'
import Grandmaster from '@renderer/assets/grandmaster.png'
import Challenger from '@renderer/assets/challenger.png'

export const getDictVal = (dict, key) => {
  return dict.find((_v) => _v.key === key)?.value || ''
}
export const getDictImg = (dict, key) => {
  return dict.find((_v) => _v.key === key)?.img || Unranked
}

export const getDictStyle = (dict, key) => {
  return dict.find((_v) => _v.key === key)?.style || ''
}

export default {
  theme: [
    {
      value: '明亮主题',
      key: 'defaultAlgorithm'
    },
    {
      value: '暗黑主题',
      key: 'darkAlgorithm'
    }
  ],
  environment: {
    HN: [
      '艾欧尼亚',
      '祖安',
      '诺克萨斯',
      '班德尔城',
      '皮尔特沃夫',
      '战争学院',
      '巨神峰',
      '雷瑟守备',
      '裁决之地',
      '黑色玫瑰',
      '暗影岛',
      '钢铁烈阳',
      '水晶之痕',
      '均衡教派',
      '影流',
      '守望之海',
      '征服之海',
      '卡拉曼达',
      '皮城警备'
    ],
    WT: ['比尔吉沃特', '德玛西亚', '弗雷尔卓德', '无畏先锋', '恕瑞玛', '扭曲丛林', '巨龙之巢'],
    EDU: ['教育网专区'],
    BGP: ['男爵领域', '峡谷之巅'],
    dict: [
      {
        key: 'HN',
        value: '电信'
      },
      {
        key: 'WT',
        value: '网通'
      },
      {
        key: 'EDU',
        value: '教育网'
      },
      {
        key: 'BGP',
        value: '双线'
      }
    ]
  },
  gameMode: [
    {
      key: 430,
      value: '匹配赛'
    },
    {
      key: 440,
      value: '灵活排位'
    },
    {
      key: 420,
      value: '单双排'
    },
    {
      key: 450,
      value: '极地大乱斗'
    },
    {
      key: 1090,
      value: '云顶匹配'
    },
    {
      key: 1100,
      value: '云顶排位'
    },
    {
      key: 1900,
      value: '无限火力'
    }
  ],
  ranked: [
    {
      key: 'NONE',
      value: '未完成定位赛',
      img: Unranked
    },
    {
      key: 'IRON',
      value: '坚韧黑铁',
      img: Black
    },
    {
      key: 'BRONZE',
      value: '英勇黄铜',
      img: bronze
    },
    {
      key: 'SILVER',
      value: '不屈白银',
      img: Silver
    },
    {
      key: 'GOLD',
      value: '荣耀黄金',
      img: Gold
    },
    {
      key: 'PLATINUM',
      value: '华贵铂金',
      img: Platinum
    },
    {
      key: 'EMERALD',
      value: '流光翡翠',
      img: Emerald
    },
    {
      key: 'DIAMOND',
      value: '璀璨钻石',
      img: Diamond
    },
    {
      key: 'MASTER',
      value: '超凡大师',
      img: Master
    },
    {
      key: 'GRANDMASTER',
      value: '傲世宗师',
      img: Grandmaster
    },
    {
      key: 'CHALLENGER',
      value: '最强王者',
      img: Challenger
    }
  ],
  position: [
    {
      key: 'jungle',
      value: '打野',
      style: {
        color: '#55acee'
      }
    },
    {
      key: 'middle',
      value: '中单',
      style: {
        color: '#cd201f'
      }
    },
    {
      key: 'bottom',
      value: 'ADC',
      style: {
        color: '#3b5999'
      }
    },
    {
      key: 'top',
      value: '上单',
      style: {
        color: '#531dab'
      }
    },
    {
      key: 'utility',
      value: '辅助',
      style: {
        color: '#c41d7f'
      }
    }
  ],
  ability: [
    {
      key: 0,
      value: '汗血宝马',
      style: {
        color: 'red'
      }
    },
    {
      key: 1,
      value: '上等马',
      style: {
        color: 'cyan'
      }
    },
    {
      key: 2,
      value: '中等马',
      style: {
        color: 'green'
      }
    },
    {
      key: 3,
      value: '下等马',
      style: {
        color: 'purple'
      }
    },
    {
      key: 4,
      value: '牛马',
      style: {
        color: '#1677ff'
      }
    }
  ]
}
